Mechanical locks and keys have been used on vending machines for over the past 50 years. One particular problem with mechanical keys is the difficulty in keeping track of the whereabouts and usage to ensure that the mechanical keys are not used by unauthorized persons or by authorized persons but at unauthorized times or places. For instance, mechanical keys for vending machines are typically given to employees responsible for assigned vending machine routes. The employee for a given route has a schedule for visiting the vending machines on the route at particular times to collect money and restocking goods in the machines. It has been a common concern that the mechanical keys for the vending machines may be stolen and used by thieves to steal money and goods from the machines. Also, it is a concern that the keys may be used either by authorized or unauthorized persons at unauthorized times to access the vending machines. What is required is an electronic security system to overcome some of the management and security problems associated with the use of mechanical keys.